{% extends "exam_system/base.html" %}

{% block title %}{{ title }}{% endblock %}

{% block content %}
    <h1>{{ title }}</h1>
    <div class="actions">
        <a href="{% url 'exam_system:import_questions' %}" class="button">导入试题</a>
        <a href="{% url 'admin:exam_system_question_changelist' %}" class="button">管理试题</a>
    </div>
    <h2>最近添加的题目：</h2>
    <ul class="question-list">
    {% for question in questions %}
        <li class="question-item">
            <strong>{{ question.subject }}</strong> -
            {{ question.content|truncatechars:50 }}
            <br>
            <small>题型：{{ question.get_question_type_display }} | 难度：{{ question.get_difficulty_display }}</small>
        </li>
    {% empty %}
        <li class="question-item">暂无题目</li>
    {% endfor %}
    </ul>
{% endblock %}